home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_spike.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  64 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_Spike.cog
  4. # Player is killed by spike if he enters face.
  5. #    Modified from TEM_Spike.cog
  6. #    
  7. # [TRM & DS]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message     startup
  15.     message     entered
  16.         
  17.     thing       player                           local
  18.     thing        campos
  19.     surface     hole0
  20.     thing        deadIndy                        local
  21.     template    tempRef=indy_sh_actor                 local
  22.     keyframe    inDie=in_die_buckle.key               local
  23.     sound       sndDie=tem_temspikes_up_kill_c.wav         local
  24.     int         dead=0                        local
  25.     int         victim                        local
  26.     
  27. end
  28.        
  29. # ========================================================================================
  30.  
  31. code
  32.  
  33. startup:
  34.     player = GetLocalPlayerThing();
  35.     return;
  36.     
  37. entered:
  38.     if(GetSenderRef() != hole0) return;
  39.     if(GetSourceRef() == player)
  40.     {
  41.     ClearActorFlags(player, 0x8);
  42.     DamageThing(player, 1000.0, 0x1, victim);
  43.     StartCutscene(0);
  44.  
  45.     SetCameraFocus(2, campos);
  46.     SetCameraSecondaryFocus(2, player);
  47.     SetCurrentCamera(2);
  48.  
  49.     PlaySoundLocal(sndDie, 1.0, 0.0, 0x0, 0);
  50.     SetThingFlags(player, 0x80000);
  51.     deadIndy = CreateThing(tempRef, player);
  52.     CaptureThing(deadIndy);
  53.     CopyPlayerHolsters(player, deadindy);
  54.     ClearThingFlags(deadIndy, 0x80000);
  55.     PlayKey(deadIndy, inDie, 4, 0x14, 0);
  56.     EndCutscene();
  57.     }
  58.     return;
  59.  
  60.  
  61. end
  62.  
  63.